<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>属性操作2</title>
  <script src="../jquery/jquery-3.3.1.min.js"></script>
  <style>
    img{
      width: 600px;
      height: 400px;
    }
  </style>
  <script>
    $(function (){
      var arry=["../img/2beijing.jpg","../img/2jinan.jpg","../img/3hangzhou.jpg"];
      var index=1;
      $("#change").click(function (){
          $("input[type='checkbox']").prop("checked","");
        if(index>2){
          index=0;
        }
        $("#img").prop("src",arry[index]);
        index++;
      });
    });
  </script>
</head>
<body>
<img id="img" src="../img/2beijing.jpg">
<a id="change" href="javascript:void(0);">换一张</a>
篮球:<input type="checkbox" checked="checked"/>
篮球:<input type="checkbox"/>
篮球:<input type="checkbox"/>
篮球:<input type="checkbox"/>
篮球:<input type="checkbox"/>
篮球:<input type="checkbox"/>
</body>
</html>